package school

import (
	"github.com/gin-gonic/gin"
)

func RegisterRouter(r *gin.Engine) {
	schoolG := r.Group("/school")
	{
		// 问题相关路由
		schoolG.POST("/question/add", AddQuestion)
		schoolG.GET("/questions", GetQuestions)
		schoolG.GET("/question/:id", GetQuestion)
		schoolG.PUT("/question/:id", UpdateQuestion)
		schoolG.DELETE("/question/:id", DeleteQuestion)
		schoolG.GET("/question/group", GetQuestionGroup)
		schoolG.POST("/question/group/add", createQuestionGroup)

		//先创建答题组
		schoolG.POST("/answer/group/create", createAnswerGroup)
		//提交
		schoolG.POST("/answer/submit", SubmitAnswer)

		//获取指定id
		schoolG.GET("/answer/group", getAnswerGroup)

		//获取自己的
		schoolG.GET("/answer/group/my", getAnswerMyGroup)

	}
}
